<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>test 5mb</title>
</head>
<body>
  <button id="add">+ 1MB 数据</button>
  <script>
    let i = 0
    document.querySelector('#add').addEventListener(
      'click', () => {
        const data = 'A'.repeat(1024*1024-4)
        localStorage.setItem(`key${i++}`, data)
      }
    )
    // .onclick 句柄式事件
    // 令牌 token
  </script>
</body>
</html>